package cn.wolfcode.shop.cloud.util;


import cn.wolfcode.shop.cloud.key.KeyPrefix;

public class SeckillKeyPrefix implements KeyPrefix {

    private int expireTime;
    private String prefix;

    public SeckillKeyPrefix(int expireTime, String prefix) {
        this.expireTime = expireTime;
        this.prefix = prefix;
    }

    @Override
    public String getPreix() {
        return this.prefix;
    }

    @Override
    public int getExpireTime() {
        return this.expireTime;
    }

    public static final SeckillKeyPrefix SECKILL_STOCK = new SeckillKeyPrefix(0,"seckill_stock:");
    public static final SeckillKeyPrefix SECKILL_ORDER = new SeckillKeyPrefix(0,"seckill_order:");
    public static final SeckillKeyPrefix SECKILL_GOOD = new SeckillKeyPrefix(0,"seckill_good:");
    public static final SeckillKeyPrefix SECKILL_PATH = new SeckillKeyPrefix(3,"SECKILL_PATH:");
    public static final SeckillKeyPrefix SECKILL_VERIFYCODE = new SeckillKeyPrefix(60,"SECKILL_VERIFYCODE:");
}
